package com.guigu.pd.base.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 线路表
 * 
 * @author deyran
 * @email deyran@gmail.com
 * @date 2022-07-19 19:09:01
 */
@Data
@TableName("pd_transport_line")
@AllArgsConstructor
@NoArgsConstructor
public class TransportLineEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * id
	 */
	@TableId
	private String id;
	/**
	 * 线路名称
	 */
	private String name;
	/**
	 * 线路编号
	 */
	private String lineNumber;
	/**
	 * 所属机构
	 */
	private String agencyId;
	/**
	 * 线路类型
	 */
	private String transportLineTypeId;

	@TableField(exist = false)
	private String transportLinename;
	/**
	 * 起始地机构id
	 */
	private String startAgencyId;
	@TableField(exist = false)
	private String startAgencyname;
	/**
	 * 目的地机构id
	 */
	private String endAgencyId;
	@TableField(exist = false)
	private String endAgencyname;
	/**
	 * 距离
	 */
	private BigDecimal distance;
	/**
	 * 成本
	 */
	private BigDecimal cost;
	/**
	 * 预计时间（分钟）
	 */
	private BigDecimal estimatedTime;
	/**
	 * 状态 0：禁用 1：正常
	 */
	@TableField("`status`")
	@TableLogic(value = "1",delval = "0")
	private Integer status;

	/**
	 * 线路与车次绑定
	 */
	@TableField(exist=false)
	List<TransportTripsEntity> transportTrips;

	@TableField(exist = false)
	private String lineid;
	/**
	 * 车次名称
	 */
	@TableField(exist = false)
	private String tripsname;
	/**
	 * 周期，1为天，2为周，3为月
	 */
	@TableField(exist = false)
	private Integer period;

	/**
	 * 发车时间
	 */
	@TableField(exist = false)
	private String departureTime;

	@TableField(exist = false)
	private String truckdriver;
}
